package s2_threadApi;
/*
* 线程休眠方法：静态方法：Thread.sleep(long millis) 毫秒 1秒 1000毫秒
* */
public class SleepDemo {
    public static void main(String[] args) throws Exception {
        for (int i = 0; i < 10; i++) {
            System.out.println(i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
